//
//  IteratorTest.m
//  LearnObjectiveC
//
//  Created by client on 2017/9/9.
//  Copyright © 2017年 吴可高. All rights reserved.
//

#import "IteratorTest.h"
#import "MyCollection.h"
#import "MyIterator.h"

@implementation IteratorTest
-(void)iterator;
{
    MyCollection * collection = [[MyCollection alloc]init];
    collection.items = @[@"A",@"B",@"C",@"D",@"E",@"F"];
    MyIterator * iterator = collection.iterator;
    iterator.collection = collection;
    while (iterator.hasNext) {
        NSString * format = [NSString stringWithFormat:@"iterator:%@",[iterator next]];
        NSLog(@"format:%@",format);
    }
}

@end
